namespace BM.Tools.WebControls.MForm.Controls
{
    using System.Web.UI;
    using System.Xml.XPath;

    using BM.Tools.WebControls.MForm.Controls.Items;    

    /// <summary>
    /// Branch is an <see cref="Offspring" /> control that corresponds to xml element that has child elements and/or attributes     
    /// </summary>
    [ToolboxData(@"<{0}:Branch runat=""server"" ></{0}:Branch>")]
    public class Branch : OffspringsOwner
    {
        /// <summary>
        /// Creates a <see cref="BranchItem" /> object
        /// </summary>
        /// <param name="index">
        /// The index.
        /// </param>
        /// <param name="navigator">
        /// The navigator.
        /// </param>
        /// <returns>
        /// the branch item object
        /// </returns>
        protected override OffspringItem CreateItem(int index, XPathNavigator navigator)
        {
            return new BranchItem(this, index, navigator);
        }
    }
}